<!DOCTYPE HTML>
<html>
<head>
<#include "/adminPage/common.html"/>
<style type="text/css">
.blue {
	color: blue;
}

.red {
	color: red;
}
</style>
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">

		<#include "/adminPage/header.html"/>
		<#include "/adminPage/menu.html"/>

		<div class="layui-body">
			<!-- 内容主体区域 -->
			<div style="padding: 15px">
				<fieldset class="layui-elem-field layui-field-title">
					<legend>项目日志</legend>
				</fieldset>

				<form action="${ctx}/adminPage/log" id="searchForm" method="post">
					<div class="layui-form search">

						<div class="layui-inline">
							<label class="layui-form-label">产生时间</label>
						</div>
						<div class="layui-inline" style="width: 100px;">
							<input type="text" name="startTime" class="layui-input laydate" value="${startTime}" placeholder="开始时间">
						</div>
						<div class="layui-inline" style="width: 100px;">
							<input type="text" name="endTime" class="layui-input laydate" value="${endTime}" placeholder="结束时间">
						</div>

						<div class="layui-inline">
							<label class="layui-form-label">阶段</label>
						</div>
						<div class="layui-inline" style="width: 100px;">
							<select name="functionStatus">
								<option value="">--全部--</option>
								<option ${(functionStatus== 0)?string('selected','')} value="0">等待阶段</option>
								<option ${(functionStatus== 1)?string('selected','')} value="1">开发阶段</option>
								<option ${(functionStatus== 2)?string('selected','')} value="2">测试阶段</option>
								<option ${(functionStatus== 5)?string('selected','')} value="5">验证阶段</option>
								<option ${(functionStatus== 3)?string('selected','')} value="3">完成阶段</option>
								<option ${(functionStatus== 4)?string('selected','')} value="4">否决阶段</option>
							</select>
						</div>
						
						<div class="layui-inline">
							<label class="layui-form-label">类型</label>
						</div>

						<div class="layui-input-inline" style="width: 100px;">
							<select name="type">
								<option value="">--全部--</option>
								<option ${(type== 0)?string('selected','')} value="0">需求</option>
								<option ${(type== 1)?string('selected','')} value="1">bug</option>
							</select>
						</div>

						<div class="layui-inline">
							<label class="layui-form-label">负责人</label>
						</div>
						
						<div class="layui-inline" style="width: 150px;">
							<select name="userId">
								<option value="">--全部--</option>
								<#list userList as user>
								<option value="${user.id}" ${(user.id==userId)?string('selected','')}>${user.trueName}</option>
								</#list>
							</select>
						</div>

						<div class="layui-inline">
							<button type="button" class="layui-btn" onclick="search()">查询</button>
						</div>
						
					</div>
				</form>

				<table class="layui-table">
					<thead>
						<tr>
							<th>序号</th>
							<th>类型</th>
							<th>内容</th>
							<th>负责人</th>
							<th>时间</th>
						</tr>
					</thead>
					<tbody>
						<#list list as functionLogResp>
						<tr>
							<td>${functionLogResp_index + 1}</td>
							<td>
								<#if functionLogResp.type==0> 需求 </#if>
								<#if functionLogResp.type==1> Bug </#if>
							</td>
							<td>
								<span class="blue">${functionLogResp.functionName}</span>
								进入
								<span class="red">${functionLogResp.toStatusName}</span>
							</td>
							<td>${functionLogResp.userNames}</td>
							<td>${functionLogResp.time?number_to_datetime?string('yyyy-MM-dd HH:mm:ss')} 
							</td>
						</tr>
						</#list>
					</tbody>
				</table>

			</div>
		</div>
	</div>


	<script src="${ctx}/js/adminPage/log/index.js?v=${jsrandom}" type="text/javascript"></script>
</body>


</html>